<?php
/**
 * Idea.php
 * @author Winbeek <winbeek@gmail.com>
 * @since 28 July 2012
 * @version $Id$
 */

final class Idea extends Nette\Application\UI\Control {
	/** @var \Nette\Database\Table\ActiveRow $account */
	private $account;

	/** @var \Nette\Database\Table\ActiveRow $idea */
	private $idea;

	/**
	 * @param Nette\Database\Table\ActiveRow $idea
	 * @param Nette\Database\Table\ActiveRow $account
	 */
	public function __construct(Nette\Database\Table\ActiveRow $idea, Nette\Database\Table\ActiveRow $account)
	{
		$this->account = $account;
		$this->idea = $idea;
	}

	public function render()
	{
		$this->template->account = $this->account;
		$this->template->idea = $this->idea;

		$this->template->setFile(__DIR__ . '/Idea.latte');
		$this->template->render();
	}

	protected function createComponentGravatar()
	{
		return new Gravatar();
	}
}